package com.wiscamp.ninechapters.problems.infrastructure.mappers.assessments;

import com.wiscamp.ninechapters.problems.infrastructure.po.assessments.AssessmentCodePO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface AssessmentCodeMapper extends JpaRepository<AssessmentCodePO, Long>, JpaSpecificationExecutor<AssessmentCodePO> {

    @Query(value = "select e from AssessmentCodePO e where e.assessmentCode = :code")
    AssessmentCodePO findAssessmentCode(String code);
}